home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-18 | 23.4 KB | 668 lines | [TEXT/MPS ] |
- /*------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # Standard File Sample Application
- #
- # StdFile
- #
- # StdFile.r - Rez Source
- #
- # Copyright © 1989 Apple Computer, Inc.
- # All rights reserved.
- #
- # Versions:
- # 1.00 04/89
- # 2.00 05/90
- # 2.01 06/92
- #
- # Components:
- # StdFile.p April 1, 1989
- # StdFile.h April 1, 1988
- # StdFile.r April 1, 1988
- # PStdFile.make April 1, 1988
- ------------------------------------------------------------------------------*/
-
- #include "Types.r"
- #include "SysTypes.r"
-
- #include "StdFile.h"
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- /* These #defines are used to set enable/disable flags of a menu */
-
- #define AllItems 0b1111111111111111111111111111111 /* 31 flags */
- #define NoItems 0b0000000000000000000000000000000
- #define MenuItem1 0b0000000000000000000000000000001
- #define MenuItem2 0b0000000000000000000000000000010
- #define MenuItem3 0b0000000000000000000000000000100
- #define MenuItem4 0b0000000000000000000000000001000
- #define MenuItem5 0b0000000000000000000000000010000
- #define MenuItem6 0b0000000000000000000000000100000
- #define MenuItem7 0b0000000000000000000000001000000
- #define MenuItem8 0b0000000000000000000000010000000
- #define MenuItem9 0b0000000000000000000000100000000
- #define MenuItem10 0b0000000000000000000001000000000
- #define MenuItem11 0b0000000000000000000010000000000
- #define MenuItem12 0b0000000000000000000100000000000
- #define MenuItem13 0b0000000000000000001000000000000
- #define MenuItem14 0b0000000000000000010000000000000
- #define MenuItem15 0b0000000000000000100000000000000
- #define MenuItem16 0b0000000000000001000000000000000
- #define MenuItem17 0b0000000000000010000000000000000
- #define MenuItem18 0b0000000000000100000000000000000
- #define MenuItem19 0b0000000000001000000000000000000
- #define MenuItem20 0b0000000000010000000000000000000
- #define MenuItem21 0b0000000000100000000000000000000
- #define MenuItem22 0b0000000001000000000000000000000
- #define MenuItem23 0b0000000010000000000000000000000
- #define MenuItem24 0b0000000100000000000000000000000
- #define MenuItem25 0b0000001000000000000000000000000
- #define MenuItem26 0b0000010000000000000000000000000
- #define MenuItem27 0b0000100000000000000000000000000
- #define MenuItem28 0b0001000000000000000000000000000
- #define MenuItem29 0b0010000000000000000000000000000
- #define MenuItem30 0b0100000000000000000000000000000
- #define MenuItem31 0b1000000000000000000000000000000
-
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // menu resources
-
- resource 'MBAR' (rMenuBar, preload) {
- {mApple, mFile, mEdit, mSFile};
- };
-
- resource 'MENU' (mApple, "Apple", preload) {
- mApple, textMenuProc, (AllItems & ~MenuItem2), enabled, apple,
- {
- "About " AppName "…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, "File", preload) { /* enable Quit only */
- mFile, textMenuProc, (NoItems | MenuItem12), enabled, "File",
- {
- "New", noicon, "N", nomark, plain;
- "Open…", noicon, "O", nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Close", noicon, "W", nomark, plain;
- "Save", noicon, "S", nomark, plain;
- "Save As…", noicon, nokey, nomark, plain;
- "Revert", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Page Setup…", noicon, nokey, nomark, plain;
- "Print…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Quit", noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, "Edit", preload) {
- mEdit, textMenuProc, NoItems, enabled, "Edit",
- {
- "Undo", noicon, "Z", nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Cut", noicon, "X", nomark, plain;
- "Copy", noicon, "C", nomark, plain;
- "Paste", noicon, "V", nomark, plain;
- "Clear", noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mSFile, "Examples", preload) {
- mSFile, textMenuProc, (AllItems), enabled, "Examples",
- {
- "Get Full Path…", noicon, nokey, nomark, plain;
- "PGetFile with Filter…", noicon, nokey, nomark, plain;
- "PGetFile with Complex Filter…",noicon, nokey, nomark, plain;
- "PGet a directory…", noicon, nokey, nomark, plain;
- "PGet Multiple Files…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "PutFile…", noicon, nokey, nomark, plain;
- "PPutFile with Format…", noicon, nokey, nomark, plain;
- "PutFile in System Folder…", noicon, nokey, nomark, plain;
- "PPutFile with List…", noicon, nokey, nomark, plain;
- "PPutFile with Options…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Idle time and Updates…", noicon, nokey, nomark, plain;
- "Remember File…", noicon, nokey, nomark, plain;
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // These are the resources used to create the bungle package used by the Finder.
-
- type rAppSignature as 'STR ';
-
- resource rAppSignature (rAppBundle, purgeable) {
- "Sample Standard File Routines - Macintosh Developer Technical Support - v2.0"
- };
-
- resource 'BNDL' (rAppBundle, purgeable) {
- rAppSignature, 0, {'ICN#', {0, rAppIcon}, 'FREF', {0, rAppBundle}
- }
- };
-
- resource 'FREF' (rAppBundle, purgeable) {
- 'APPL', 0, ""
- };
-
- resource 'ICN#' (rAppIcon, "App Icon", purgeable) {
- {
- /* [1] */
- $"0000 0000 0000 0000 FFFF FFFE 8000 0003"
- $"83FE 0003 8202 1DFB 83FE 0003 8000 0003"
- $"BFFF F1F3 A000 920B AEDE 920B A000 F1F3"
- $"ADD4 9003 A000 91F3 AFB0 920B A000 920B"
- $"ABEC 91F3 A000 9003 A000 F2AB A000 9003"
- $"A000 91F3 BFFF F20B 8000 020B 8000 01F3"
- $"BFFF F003 A000 11F3 ADEC 120B A000 120B"
- $"BFFF F1F3 8000 0003 FFFF FFFF 7FFF FFFF",
- /* [2] */
- $"0000 0000 0000 0000 FFFF FFFE FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF 7FFF FFFF"
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- resource 'vers' (1, purgeable) {
- 2, 0, beta, 3, verUs,
- "2.0b3", "2.0b3, Copyright © 1989-90 Apple Developer Technical Support"
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- resource 'SIZE' (-1, purgeable) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground, /* we can background, but we're not */
- multiFinderAware, /* we do our own activate/deactivate */
- backgroundAndForeground, /* this is not a background-only application! */
- dontGetFrontClicks, /* standard, don’t want front clicks */
- ignoreChildDiedEvents, /* I’m not a debugger and I don’t sub-launch */
- is32BitCompatible, /* this is a 32 bit clean application */
- reserved, reserved, reserved, reserved,
- reserved, reserved, reserved,
- kPrefSize,
- kMinSize
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // misc strings used for misc reasons
-
- resource 'STR#' (rStrMisc, "Misc Strings", purgeable) {
- {
- /* [1] */ "K free";
- /* [2] */ "Select a Folder";
- /* [3] */ "The Cancel button.";
- /* [4] */ "Save As…";
- /* [5] */ " temp"; /* suffix to temporary file, includes a space */
- /* [6] */ "K on disk";
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // strings used to initializ the List Manager list of file types
-
- resource 'STR#' (rStrList, "List Strings", purgeable) {
- {
- /* [1] */ "Normal";
- /* [2] */ "Text";
- /* [3] */ "PICT";
- /* [4] */ "TIFF";
- /* [5] */ "ESPF";
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // this ALRT and DITL are used as an About screen
-
- resource 'ALRT' (rAboutAlert, "About", purgeable) {
- {0, 0, 136, 290}, rAboutAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rAboutAlert, "About", purgeable) {
- {
- /* [1] */ {104, 180, 124, 260}, Button {enabled, "OK"},
- /* [2] */ {8, 8, 24, 262}, StaticText {disabled, "^0"},
- /* [3] */ {32, 8, 48, 65}, StaticText {disabled, "Version:"},
- /* [4] */ {32, 65, 64, 270}, StaticText {disabled, "^1"},
- /* [5] */ {72, 8, 88, 136}, StaticText {disabled, "Brought to you by:"},
- /* [6] */ {96, 24, 128, 167}, StaticText {disabled, "Apple Developer Technical Support"},
- }
- };
-
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // These are the resources used to display error messages to the user.
-
- resource 'ALRT' (rUserAlert, "User Alert", purgeable) {
- {0, 0, 129, 304}, rUserAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rUserAlert, "User Alert", purgeable) {
- {
- /* [1] */ {104, 83, 121, 165}, Button {enabled, "OK"},
- /* [2] */ {8, 72, 88, 296}, StaticText {disabled, "^0 ^1"},
- /* [3] */ {10, 20, 42, 52}, Icon {disabled, rCautionIcon}
- }
- };
-
- // These are the strings used for error messages.
- resource 'STR#' (rErrStrings, purgeable) {
- {
- /* [1] */ "An error has occurred.";
- /* [2] */ "A Memory Manager error has occurred.";
- /* [3] */ "A Resource Manager error has occurred.";
- /* [4] */ "Memory is too low to continue. Try increasing the SIZE resource.";
- /* [5] */ "Could not find application's menu resources.";
- /* [6] */ "A File System error has occurred.";
- /* [7] */ "The file to be remembered has been lost, please select another file.";
- /* [8] */ "Requires A/UX version 2.0 or later.";
- /* [9] */ "Requires a System with the enhanced ROMs, such as the 512Ke"
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // These are the resources used for an emergency exit alert.
-
- resource 'ALRT' (rExitAlert, "Exit Alert", purgeable) {
- {0, 0, 129, 248}, rExitAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rExitAlert, "Exit Alert", purgeable) {
- {
- /* [1] */ {104, 83, 121, 165}, Button {enabled, "OK"},
- /* [2] */ {10, 20, 42, 52}, Icon {disabled, rCautionIcon},
- /* [3] */ {8, 72, 40, 240}, StaticText {disabled, "Sorry, an unrecoverable error has occurred!"},
- /* [4] */ {48, 8, 96, 240}, StaticText {disabled, "^0"}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // alert used to display some file info when we've found a file
-
- resource 'ALRT' (rFInfoAlert, "Found File", purgeable) {
- {40, 40, 188, 354}, rFInfoAlert,
- {
- /* [1] */ OK, visible, sound1,
- /* [2] */ OK, visible, sound1,
- /* [3] */ OK, visible, sound1,
- /* [4] */ OK, visible, sound1
- }
- };
-
- resource 'DITL' (rFInfoAlert, purgeable) {
- {
- /* [1] */ {112, 224, 132, 284}, Button {enabled, "OK"},
- /* [2] */ {56, 8, 104, 288}, StaticText {disabled, "File Name: “^0”\nModification date: ^1"},
- /* [3] */ {8, 56, 40, 288}, StaticText {disabled, "The following file has been found."},
- /* [4] */ {8, 8, 40, 40}, Icon {disabled, 1}
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // alert used to show the selection made from Std File
-
- resource 'ALRT' (rShowSelectionAlert, "Show Selection", purgeable) {
- {42, 42, 214, 406}, rShowSelectionAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- }
- };
-
- resource 'DITL' (rShowSelectionAlert, "Show Selection", purgeable) {
- {
- /* [1] */ {144, 272, 164, 332}, Button {enabled, "OK"},
- /* [2] */ {32, 64, 136, 344}, StaticText {disabled, "“^0”"},
- /* [3] */ {8, 64, 24, 224}, StaticText {disabled, "The item selected was:"},
- /* [4] */ {10, 20, 42, 52}, Icon {disabled, rNoteIcon},
- /* [5] */ {144, 8, 168, 248}, StaticText {disabled, "^1"}
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // a copy of the real Standard GetFile Dialog
-
- resource 'DLOG' (kGetFileDLOG, "Std Get File", purgeable) {
- {0, 0, 200, 348}, dBoxProc, invisible, noGoAway, 0x0, kGetFileDLOG, ""
- };
-
- resource 'DITL' (kGetFileDLOG, "Std Get File", purgeable) {
- {
- /* [1] */ {138, 256, 156, 336}, Button {enabled,"Open"},
- /* [2] */ {1152, 59, 1232, 77}, Button {enabled,"Hidden"},
- /* [3] */ {163, 256, 181, 336}, Button {enabled,"Cancel"},
- /* [4] */ {39, 232, 59, 347}, UserItem {disabled},
- /* [5] */ {68, 256, 86, 336}, Button {enabled,"Eject"},
- /* [6] */ {93, 256, 111, 336}, Button {enabled,"Drive"},
- /* [7] */ {39, 12, 185, 230}, UserItem {enabled},
- /* [8] */ {39, 229, 185, 246}, UserItem {enabled},
- /* [9] */ {124, 252, 125, 340}, UserItem {disabled},
- /* [10] */ {1044, 20, 1145, 116}, StaticText {disabled,""}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // a copy of the real of Standard PutFile Dialog
-
- resource 'DLOG' (kPutFileDLOG, "Std Put File", purgeable) {
- {0, 0, 184, 304}, dBoxProc, invisible, noGoAway, 0x0, kPutFileDLOG, ""
- };
-
- resource 'DITL' (kPutFileDLOG, "Std Put File", purgeable) {
- {
- /* [1] */ {132, 218, 150, 288}, Button {enabled,"Save"},
- /* [2] */ {158, 218, 176, 288}, Button {enabled,"Cancel"},
- /* [3] */ {136, 14, 152, 197}, StaticText {disabled,"Save as:"},
- /* [4] */ {29, 198, 49, 302}, UserItem {disabled},
- /* [5] */ {56, 218, 74, 288}, Button {enabled,"Eject"},
- /* [6] */ {82, 218, 100, 288}, Button {enabled,"Drive"},
- /* [7] */ {157, 17, 173, 194}, EditText {enabled,""},
- /* [8] */ {29, 14, 127, 197}, UserItem {disabled}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // used in SFGetFile with a multi-file list
-
- resource 'DLOG' (rListGetDLOG, "Multi Get File", purgeable) {
- {40, 40, 324, 398}, dBoxProc, invisible, noGoAway, 0x0, rListGetDLOG, ""
- };
-
- resource 'DITL' (rListGetDLOG, "Multi Get File", purgeable) {
- {
- /* [1] */ {216, 256, 234, 336}, Button {enabled, "Add"},
- /* [2] */ {1152, 59, 1232, 77}, Button {enabled, ""},
- /* [3] */ {163, 256, 181, 336}, Button {enabled, "Cancel"},
- /* [4] */ {39, 232, 59, 347}, UserItem {disabled},
- /* [5] */ {68, 256, 86, 336}, Button {enabled, "Eject"},
- /* [6] */ {93, 256, 111, 336}, Button {enabled, "Drive"},
- /* [7] */ {39, 12, 185, 230}, UserItem {enabled},
- /* [8] */ {39, 229, 185, 246}, UserItem {enabled},
- /* [9] */ {124, 252, 125, 340}, UserItem {disabled},
- /* [10] */ {1044, 20, 1145, 116}, StaticText {disabled, ""},
- /* [11] */ {202, 12, 280, 230}, UserItem {disabled},
- /* [12] */ {138, 256, 156, 336}, Button {enabled, "Open"},
- /* [13] */ {241, 256, 259, 336}, Button {enabled, "Remove"}
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Used for custom SFPGetFile having a filter controlled by some buttons
-
- resource 'DLOG' (rSFPGetFileDLOG, "Custom Get File", purgeable) {
- {0, 0, 200, 349}, dBoxProc, invisible, noGoAway, 0x0, rSFPGetFileDLOG, ""
- };
-
- resource 'DITL' (rSFPGetFileDLOG, "Custom Get File", purgeable) {
- {
- /* [1] */ {138, 256, 156, 336}, Button {enabled,"Open"};
- /* [2] */ {1152, 59, 1232, 77}, Button {enabled,"Hidden"};
- /* [3] */ {163, 256, 181, 336}, Button {enabled,"Cancel"};
- /* [4] */ {39, 252, 59, 347}, UserItem {disabled};
- /* [5] */ {68, 256, 86, 336}, Button {enabled,"Eject"};
- /* [6] */ {93, 256, 111, 336}, Button {enabled,"Drive"};
- /* [7] */ {39, 12, 180, 230}, UserItem {enabled};
- /* [8] */ {39, 229, 180, 245}, UserItem {enabled};
- /* [9] */ {124, 252, 125, 340}, UserItem {disabled};
- /* [10] */ {1044, 20, 1145, 116}, StaticText {disabled,""};
- /* [11] */ {1, 14, 20, 142}, RadioButton {enabled,"Text files only"};
- /* [12] */ {19, 14, 38, 176}, RadioButton {enabled,"Applications only"};
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Used for custom SFPPutFile that displays the free space, and controls
- // which files to be viewed
-
- resource 'DLOG' (rSFPPutFileDLOG, "Custom Put File", purgeable) {
- {0, 0, 164, 304}, dBoxProc, invisible, noGoAway, 0x0, rSFPPutFileDLOG, ""
- };
-
- resource 'DITL' (rSFPPutFileDLOG, "Custom Put File", purgeable) {
- {
- /* [1] */ {74, 12, 92, 82}, Button {enabled,"Save"};
- /* [2] */ {74, 114, 92, 184}, Button {enabled,"Cancel"};
- /* [3] */ {12, 12, 28, 184}, StaticText {disabled,"Save as:"};
- /* [4] */ {16, 209, 34, 295}, UserItem {disabled};
- /* [5] */ {74, 217, 92, 287}, Button {enabled,"Eject"};
- /* [6] */ {101, 217, 119, 287}, Button {enabled,"Drive"};
- /* [7] */ {34, 14, 50, 182}, EditText {enabled,""};
- /* [8] */ {16, 200, 88, 201}, UserItem {disabled};
- /* [9] */ {102, 11, 122, 108}, RadioButton {enabled,"Normal"};
- /* [10] */ {129, 11, 149, 108}, RadioButton {enabled,"Text Only"};
- /* [11] */ {37, 202, 73, 303}, UserItem {disabled}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Used for Get Directory
-
- resource 'DLOG' (rGetDirectoryDLOG, "Get Directory", purgeable) {
- {0, 0, 217, 348}, dBoxProc, invisible, noGoAway, 0x0, rGetDirectoryDLOG, ""
- };
-
- resource 'DITL' (rGetDirectoryDLOG, "Get Directory", purgeable) {
- {
- /* [1] */ {142, 256, 160, 336}, Button {enabled,"Open"},
- /* [2] */ {1152, 59, 1232, 77}, Button {enabled,"Hidden"},
- /* [3] */ {193, 256, 211, 336}, Button {enabled,"Cancel"},
- /* [4] */ {43, 232, 63, 347}, UserItem {disabled},
- /* [5] */ {72, 256, 90, 336}, Button {enabled,"Eject"},
- /* [6] */ {97, 256, 115, 336}, Button {enabled,"Drive"},
- /* [7] */ {43, 12, 189, 230}, UserItem {enabled},
- /* [8] */ {43, 229, 189, 246}, UserItem {enabled},
- /* [9] */ {128, 252, 129, 340}, UserItem {disabled},
- /* [10] */ {1044, 20, 1145, 116}, StaticText {disabled,""},
- /* [11] */ {167, 256, 185, 336}, Button {enabled,"Directory"},
- /* [12] */ {0, 30, 18, 215}, Button {enabled,"Select Current Directory:"},
- /* [13] */ {200, 20, 1145, 136}, StaticText {disabled,""}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // used in PPutFile to display a list containing a set of file types
-
- resource 'DLOG' (rPutListsFileDLOG, "List In Put", purgeable) {
- {0, 0, 262, 304}, dBoxProc, invisible, noGoAway, 0x0, rPutListsFileDLOG, ""
- };
-
- resource 'DITL' (rPutListsFileDLOG, "List In Put", purgeable) {
- {
- /* [1] */ {132, 218, 150, 288}, Button {enabled,"Save"},
- /* [2] */ {158, 218, 176, 288}, Button {enabled,"Cancel"},
- /* [3] */ {136, 14, 152, 197}, StaticText {disabled,"Save as:"},
- /* [4] */ {29, 198, 49, 302}, UserItem {disabled},
- /* [5] */ {56, 218, 74, 288}, Button {enabled,"Eject"},
- /* [6] */ {82, 218, 100, 288}, Button {enabled,"Drive"},
- /* [7] */ {157, 17, 173, 194}, EditText {enabled,""},
- /* [8] */ {29, 14, 127, 197}, UserItem {disabled},
- /* [9] */ {185, 14, 257, 150}, UserItem {disabled}
- }
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // used in PPutFile to install an option button which brings up an additional
- // dialog containing a set of file types
-
- resource 'DLOG' (rOptionsDLOG, "Options Put", purgeable) {
- {0, 0, 214, 304}, dBoxProc, invisible, noGoAway, 0x0, rOptionsDLOG, ""
- };
-
- resource 'DITL' (rOptionsDLOG, "Options Put", purgeable) {
- {
- /* [1] */ {132, 218, 150, 288}, Button {enabled,"Save"},
- /* [2] */ {158, 218, 176, 288}, Button {enabled,"Cancel"},
- /* [3] */ {136, 14, 152, 197}, StaticText {disabled,"Save as:"},
- /* [4] */ {29, 198, 49, 302}, UserItem {disabled},
- /* [5] */ {56, 218, 74, 288}, Button {enabled,"Eject"},
- /* [6] */ {82, 218, 100, 288}, Button {enabled,"Drive"},
- /* [7] */ {157, 17, 173, 194}, EditText {enabled,""},
- /* [8] */ {29, 14, 127, 197}, UserItem {disabled},
- /* [9] */ {184, 218, 202, 288}, Button {enabled,"Options…"},
- /* [10] */ {184, 14, 202, 197}, StaticText {disabled,"ZowiePaint"},
- }
- };
-
-
- resource 'DLOG' (rOptionsSubDLOG, "Options Sub-Dialog", purgeable) {
- {40, 40, 184, 306}, dBoxProc, visible, noGoAway, 0x0, rOptionsSubDLOG, ""
- };
-
- resource 'DITL' (rOptionsSubDLOG, "Options Sub-Dialog", purgeable) {
- {
- /* [1] */ {112, 176, 132, 236}, Button {enabled,"OK"},
- /* [2] */ {112, 96, 132, 156}, Button {enabled,"Cancel"},
- /* [3] */ {40, 24, 56, 120}, RadioButton {enabled,"ZowiePaint"},
- /* [4] */ {56, 24, 72, 120}, RadioButton {enabled,"PICT2"},
- /* [5] */ {72, 24, 88, 120}, RadioButton {enabled,"PICT"},
- /* [6] */ {40, 144, 56, 240}, RadioButton {enabled,"MacPaint"},
- /* [7] */ {72, 144, 88, 240}, RadioButton {enabled,"TIFF"},
- /* [8] */ {56, 144, 72, 240}, RadioButton {enabled,"PixelPaint"},
- /* [9] */ {24, 16, 96, 248}, UserItem {disabled},
- /* [10] */ {16, 32, 36, 92}, StaticText {disabled,"Formats"}
- }
- };
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // used in PGetFile to demonstrate idle time. It contains some statText items
- // which are updated during the idle events. In addition, a window is created
- // in the background which is asking for update events.
-
- resource 'DLOG' (rGetIdleUpdates, "Idle Updates", purgeable) {
- {0, 0, 232, 348}, dBoxProc, invisible, noGoAway, 0x0, rGetIdleUpdates, ""
- };
-
- resource 'DITL' (rGetIdleUpdates, "Idle Updates", purgeable) {
- {
- /* [1] */ {138, 256, 156, 336}, Button {enabled, "Open"},
- /* [2] */ {1152, 59, 1232, 77}, Button {enabled, "Hidden"},
- /* [3] */ {163, 256, 181, 336}, Button {enabled, "Cancel"},
- /* [4] */ {39, 232, 59, 347}, UserItem {disabled},
- /* [5] */ {68, 256, 86, 336}, Button {enabled, "Eject"},
- /* [6] */ {93, 256, 111, 336}, Button {enabled, "Drive"},
- /* [7] */ {39, 12, 185, 230}, UserItem {enabled},
- /* [8] */ {39, 229, 185, 246}, UserItem {enabled},
- /* [9] */ {124, 252, 125, 340}, UserItem {disabled},
- /* [10] */ {1044, 20, 1145, 116}, StaticText {disabled, ""},
- /* [11] */ {16, 248, 32, 344}, StaticText {disabled, ""},
- /* [12] */ {200, 12, 220, 344}, StaticText {disabled, ""}
- }
- };
-
- resource 'WIND' (rUpdateWindow, "Update Window", purgeable) {
- {45, 20, 236, 340}, documentProc, visible, noGoAway, 0x0, "Window needing updates"
- };
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // The animated cursor resource used in the MPW CursorCtl unit is not
- // defined by MPW. So, I’ve created the type for it.
- // These are the resources used for the animated cursors. They are preloaded
- // and non-purgeable to help reduce memory fragmentation.
-
-
- //type 'acur' {
- // integer = $$Countof(AcursArray); /*Number of cursors (“frames of film”)*/
- // fill word; /*Next frame to show <for internal use>*/
- // wide array AcursArray {
- // integer; /*'CURS' resource id for frame #1*/
- // fill word; /*<for internal use>*/
- // };
- //};
-
- resource 'acur' (0, preload, nonPurgeable) {
- {
- rACursor1, rACursor2, rACursor3, rACursor4
- }
- };
-
- resource 'CURS' (rACursor1, preload, nonPurgeable) {
- $"00 00 00 00 00 00 16 00 3E 01 54 03 C3 05 F3 FD"
- $"08 FA 0C 72 0C 02 0D F2 0A 0A 0A 0A 0A 0A 1C 1E",
- $"00 00 00 00 00 00 16 00 3E 01 7C 03 FF 07 FF FF"
- $"0F FE 0F FE 0F FE 0F FE 0E 0E 0E 0E 0E 0E 1C 1E",
- {4, 10}
- };
-
- resource 'CURS' (rACursor2, preload, nonPurgeable) {
- $"30 30 28 38 24 24 13 AC 0B C6 04 0C 02 36 02 36"
- $"02 E0 02 E0 0E E0 10 60 26 20 29 90 28 50 30 38",
- $"30 30 38 38 3C 3C 1F BC 0F FE 07 FC 03 F6 03 F6"
- $"03 E0 03 E0 0F E0 1F E0 3F E0 39 F0 38 70 30 38",
- {15, 7}
- };
-
- resource 'CURS' (rACursor3, preload, nonPurgeable) {
- $"00 00 06 C0 0A A0 12 90 14 58 17 D8 20 18 27 18"
- $"4F 18 9F CF E0 C3 80 2A 00 FC 00 D0",
- $"00 00 06 C0 0E E0 1E F0 1C 78 1F F8 3F F8 3F F8"
- $"7F F8 FF FF E0 FF 80 3E 00 FC 00 D0",
- {9, 6}
- };
-
- resource 'CURS' (rACursor4, preload, nonPurgeable) {
- $"0E 06 05 0A 04 CA 02 32 03 04 03 B8 03 A0 03 A0"
- $"36 20 36 20 18 10 31 E8 1A E4 12 12 0E 0A 06 06",
- $"0E 06 07 0E 07 CE 03 FE 03 FC 03 F8 03 E0 03 E0"
- $"37 E0 37 E0 1F F0 3F F8 1E FC 1E 1E 0E 0E 06 06",
- {6, 6}
- };
-
-
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // I've created custom a template and resource to remember a file.
-
- type 'FILE' {
- hex string [28]; /*volume name (27 chars)*/
- unsigned longint; /*dirID is a LongInt*/
- hex string [64]; /*file name (63 chars)*/
- };
-
-
- resource 'FILE' (rMemorizedFile, purgeable) {"", 0, ""};
-
-
-
-